#include <stdio.h>

#include "button.h"
#include "dialog.h"

void slot(widget_t *self, void *param)
{
    puts("button clicked");
}

void quit(widget_t *self, void *param)
{
    SendMessage(self->hwnd,WM_CLOSE,0,0);
}

int main(int argc, char *argv[])
{
    widget_t *dialog = create_dialog("dialog",-1,-1,300,200);
    widget_t *hello_btn = create_button(dialog,"hello",50,50,50,23,WS_TABSTOP);

    widget_t *quit_btn = create_button(dialog,"quit",50,80,50,23,WS_TABSTOP);

    CONNECT(hello_btn, BN_CLICKED, dialog, slot);
    CONNECT(quit_btn, BN_CLICKED, dialog, quit);

    return 0;
}

